package hunterxhunter.greedisland.data.map;

import java.awt.Rectangle;
import java.io.Serializable;

/**
 *
 * @author Markus Schr&ouml;der
 */
public class Layer implements Serializable {

    private String imageRef;
    private Rectangle src;

    public Layer(String imageRef, Rectangle src) {
        this.imageRef = imageRef;
        this.src = src;
    }
    
    public boolean isUsed() {
        return imageRef != null && src != null;
    }
    
    /**
     * @return the imageRef
     */
    public String getImageRef() {
        return imageRef;
    }

    /**
     * @return the src
     */
    public Rectangle getSrc() {
        return src;
    }

    /**
     * @param imageRef the imageRef to set
     */
    public void setImageRef(String imageRef) {
        this.imageRef = imageRef;
    }

    /**
     * @param src the src to set
     */
    public void setSrc(Rectangle src) {
        this.src = src;
    }
    
}
